package com.moduls.interfaceFunction.excel.export;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 账单格式
 * @author pc
 *
 */
public class BillBean {

	private String item_name;
	private String unit;
	private String nums;
	private String price;
	private String amount;
	private String remark;
	
	
	public BillBean(){
		
	}
	public BillBean(Map<String, Object> map){
		if (!(map.get("item_name") == null || map.get("item_name").equals(""))) {
    		this.item_name = map.get("item_name").toString();
		}
    	if (!(map.get("unit") == null || map.get("unit").equals(""))) {
    		this.unit = map.get("unit").toString();
		}
    	if (!(map.get("nums") == null || map.get("nums").equals(""))) {
    		this.nums = map.get("nums").toString();
		}
    	if (!(map.get("price") == null || map.get("price").equals(""))) {
    		this.price = map.get("price").toString();
		}
    	if (!(map.get("amount") == null || map.get("amount").equals(""))) {
    		this.amount = map.get("amount").toString();
		}
    	if (!(map.get("remark") == null || map.get("remark").equals(""))) {
    		this.remark = map.get("remark").toString();
		}
	}
	
	public static List<BillBean> getBean(List<Map<String, Object>> list) {
		List<BillBean> billBeans = null;
		if (list != null && list.size() > 0) {
			billBeans = new ArrayList<>();
			for (Map<String, Object> map : list) {
				billBeans.add(new BillBean(map));
			}
		}
		return billBeans;
	}
	
	public String getItem_name() {
		return item_name;
	}
	public void setItem_name(String item_name) {
		this.item_name = item_name;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	public String getNums() {
		return nums;
	}
	public void setNums(String nums) {
		this.nums = nums;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
}
